import smbus

class FAN:
    def __init__(self,address = 0x20):
        self.FAN_STATE = 'false'

        self.i2c = smbus.SMBus(1)
        self.address = address#0x20
        self.FAN_OFF()
    def FAN_ON(self):
        self.i2c.write_byte(self.address, 0xFE & self.i2c.read_byte(self.address))
        self.FAN_STATE = 'true'
    def FAN_OFF(self):
        self.i2c.write_byte(self.address, 0x01 | self.i2c.read_byte(self.address))
        self.FAN_STATE = 'false'
